package com.itheima.job.api;

import com.itheima.job.pojo.dto.AuthDTO;
import com.itheima.job.pojo.dto.UserDTO;
import com.itheima.job.pojo.result.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author byZhao
 * @Modify 2021-11-16 22:34
 * @Description <p> </p>
 * <p> Talk is cheap . Show me the code! </p>
 *   对外暴露的接口！
 */
@RequestMapping("/user")
public interface UserControllerApi {
    /**
     * 用户注册接口
     *
     * @param userDTO
     * @return
     */
    @PostMapping("/register")
    Result register(@RequestBody UserDTO userDTO);

    /**
     * 用户认证业务对象
     *
     * @param authDTO
     * @return
     */
    @PostMapping("/auth")
    Result login(@RequestBody AuthDTO authDTO);


    /**
     * 用户激活账号
     *
     * @param
     * @return
     */
    @PostMapping("/activate")
    Result activate(String username, String code);

}
